//
//  Rock.m
//  TheifRunning
//
//  Created by Lion on 6/13/14.
//  Copyright (c) 2014 Apportable. All rights reserved.
//

#import "Rock.h"

@implementation Rock{
    CCNode *_rock;
}

#define ARC4RANDOM_MAX      0x100000000
// visibility on a 3,5-inch iPhone ends a 88 points and we want some meat
static const CGFloat minimumXPosition = 0;
// visibility ends at 480 and we want some meat
static const CGFloat maximumXPosition = 200;

- (void)setupRandomPosition{
    // value between 0.f and 1.f
    CGFloat random = ((double)arc4random() / ARC4RANDOM_MAX);
    CGFloat rangeX = maximumXPosition - minimumXPosition;
    _rock.position = ccp(_rock.position.x + (random * rangeX), _rock.position.y);
}

@end
